<?php 
    $tmpl = new XTemplate('sites/tpml/qldiem/insert.html');
    $sql ="SELECT * FROM monhoc WHERE id_khoi=".$idkhoi;
    $data = $db->Execute($sql);
    foreach($data as $value){
        $tmpl->insert_loop('DIEMINSERT.monhoc',array('monhoc'=>$value));
    }
?>